#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <ctime>
 
using namespace std;
typedef long long ll;

char a[101], t;
int n, i, c;

void read(){
	scanf("%s", a);
}
int process(){
	n = strlen(a);
	if(n<7)return 0;
	
	t=a[0];c=1;
	for(i=1, t=0;i<n;i++){
		if(t!=a[i]){t=a[i];c=1;}
		else c++;
		if(c==7)return 1;
	}
	
	return 0;
}
int main(){
	freopen("in.txt","r",stdin);//freopen("out.txt","w",stdout);
	read();
	if(process())printf("YES");
	else printf("NO");
	return 0;
}
